﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
using System.Web.UI.HtmlControls;

namespace NJL.Web
{
    public partial class HelpCenter : BasePageVisitor
    {
        private readonly BLL.NJL_SYS_NEWS bllNews = new BLL.NJL_SYS_NEWS();
        protected IList<Model.NJL_SYS_NEWS> LIST_NEWS;

        protected string NEWS_TYPE_CODE = "1";
        protected string NEWS_TYPE_NAME;

        protected string NEWS_TITLE = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData();
                LoadPageSEO();
            }
            //base.LoadPageSeoInformation("帮助中心");
        }

        /// <summary>
        /// 加载页面SEO
        /// </summary>
        private void LoadPageSEO()
        {
            Page.Title = "帮助中心-"+WEBSITE_SYS_BASE.WEBSITE_NAME;

            //HtmlMeta myMeta = new HtmlMeta();
            //myMeta.Name = "Keywords";
            //myMeta.Content = WEBSITE_SYS_BASE.WEBSITE_KEYWORDS;
            //this.Header.Controls.Add(myMeta);

            //HtmlMeta myMeta1 = new HtmlMeta();
            //myMeta1.Name = "Description";
            //myMeta1.Content = WEBSITE_SYS_BASE.WEBSITE_DESCRIPTION;
            //this.Header.Controls.Add(myMeta1);
        }
        private void LoadData()
        {
            if (Request.QueryString["title"] != null)
            {
                NEWS_TITLE = Server.HtmlDecode(Request.QueryString["title"]);
            }
            string strWhere = " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='" + NEWS_TYPE_CODE + "' ";

            LIST_NEWS = bllNews.GetModelList(1000, strWhere, " PUBLISH_DATE_TIME DESC");
        }
    }
}